package de.nordakademie.wpk.boerse.ui.job;

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;

import de.nordakademie.wpk.boerse.ui.business.BoerseServiceManager;

public class RetriveDepotJob extends Job {

	public RetriveDepotJob(String name) {
		super(name);
	}

	@Override
	protected IStatus run(IProgressMonitor monitor) {
		monitor.beginTask("Abrufen des Depotdaten", IProgressMonitor.UNKNOWN);
		BoerseServiceManager.getInstance().setDepots(
				BoerseServiceManager.getInstance().getBoerseService()
						.getDepots());
		monitor.done();
		return Status.OK_STATUS;
	}

}
